package com.yanfan;

import com.alibaba.fastjson2.JSONObject;
import com.yanfan.ibms.common.utils.HttpUtil;
import com.yanfan.ibms.common.utils.HttpUtils2;

public class Main {
    public static void main(String[] args) {
//        JSONObject jso = new JSONObject();
//        jso.put("curPage",1);
//        jso.put("pageSize",100);
//        jso.put("start","2024-10-01 00:11:11");
//        jso.put("end","2024-10-21 14:11:11");
//        JSONObject jsonObject = HttpUtils2.sendPostBody(
//                "http://10.21.10.248:8080/ocs/reformer/interface/MjOpenDoorRecord",
//                null, jso);
//        JSONObject json = JSONObject.parseObject(jsonObject.get("obj").toString());
//        Object object = json.get("list");

        String str = "Drivers.NiagaraNetwork.JFGJ_WEB8000_LS.points.DDC_5_6.DDC_5_1.RFAU_5F_1_SA_T";

        // 查找RFAU的起始索引
        int startIndex = str.indexOf("RFAU");
        if (startIndex!= -1) {
            // 截取出RFAU
            String result = str.substring(startIndex, startIndex + 4);
            System.out.println(result);
        } else {
            System.out.println("字符串中未找到 'RFAU'");
        }

    }
}
